#include <algorithm>
#include <cstdio>
using namespace std;

const int N = 300001;
int n;
int a[N];
long long sum = 0;
long long tmp = 0;
int main() {

#ifndef ONLINE_JUDGE
#ifdef DEBUG
	freopen("testdata.in", "r", stdin);
	freopen("testdata.out", "w", stdout);
#endif
#ifndef DEBUG
	freopen("game.in", "r", stdin);
	freopen("game.out", "w", stdout);
#endif
#endif

	scanf("%d", &n);
	for (int i = 1; i <= n; ++i) {
		scanf("%d", &a[i]);
		sum = max(sum, (long long)a[i]);
	}
	long long l = sum, r = 1e18;
	long long mid = 0;
	while (l < r) {
		mid = (l + r) >> 1;
		tmp = 0;
		for (int i = 1; i <= n; ++i) {
			tmp += (mid - a[i]);
		}
		if (tmp < mid) {
			l = mid + 1;
		} else {
			r = mid;
		}
	}
	printf("%lld", l);
	return 0;
}